package com.framework.modules.dataview.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.framework.common.utils.PageUtils;
import com.framework.common.utils.Query;
import com.framework.modules.dataview.dao.ViewUserGiftListDao;
import com.framework.modules.dataview.entity.ViewUserGiftListEntity;
import com.framework.modules.dataview.service.ViewUserGiftListService;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.List;
import java.util.Map;


@Service("viewUserGiftListService")
public class ViewUserGiftListServiceImpl extends ServiceImpl<ViewUserGiftListDao, ViewUserGiftListEntity> implements ViewUserGiftListService {

    private final List<String> columns=Arrays.asList("adddate");


    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<ViewUserGiftListEntity> page = this.selectPage(
                new Query<ViewUserGiftListEntity>(params).getPage(),
                new EntityWrapper<ViewUserGiftListEntity>().eq("uid",params.get("uid"))
        );

        return new PageUtils(page);
    }

}
